- Title
- Learning to log: helping developers make informed logging decisions
- Creator
- Zhu, Jieming; He, Pinjia; Fu, Qiang; Zhang, Hongyu; Lyu, Michael R.; Zhang, Dongmei
- Relation
- 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering . Proceedings of the 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering (Florence, Italy 16-24 May, 2015) p. 415-425
- Publisher Link
- http://dx.doi.org/10.1109/ICSE.2015.60
- Publisher
- Institute of Electrical and Electronics Engineers
- Resource Type
- conference paper
- Date
- 2015
- Description
- Logging is a common programming practice of practical importance to collect system runtime information for postmortem analysis. Strategic logging placement is desired to cover necessary runtime information without incurring unintended consequences (e.g., Performance overhead, trivial logs). However, in current practice, there is a lack of rigorous specifications for developers to govern their logging behaviours. Logging has become an important yet tough decision which mostly depends on the domain knowledge of developers. To reduce the effort on making logging decisions, in this paper, we propose a "learning to log" framework, which aims to provide informative guidance on logging during development. As a proof of concept, we provide the design and implementation of a logging suggestion tool, Log Advisor, which automatically learns the common logging practices on where to log from existing logging instances and further leverages them for actionable suggestions to developers. Specifically, we identify the important factors for determining where to log and extract them as structural features, textual features, and syntactic features. Then, by applying machine learning techniques (e.g., Feature selection and classifier learning) and noise handling techniques, we achieve high accuracy of logging suggestions. We evaluate Log Advisor on two industrial software systems from Microsoft and two open-source software systems from Git Hub (totally 19.1M LOC and 100.6K logging statements). The encouraging experimental results, as well as a user study, demonstrate the feasibility and effectiveness of our logging suggestion tool. We believe our work can serve as an important first step towards the goal of "learning to log".
- Subject
- public domain software; artificial intelligence; programming
- Identifier
- http://hdl.handle.net/1959.13/1356591
- Identifier
- uon:31726
- Identifier
- ISBN:9781479919345
- Language
- eng
- Reviewed
- Hits: 4995
- Visitors: 4924
- Downloads: 0
Thumbnail | File | Description | Size | Format |
---|